package cn.slipi.admin.common.contants.enumtype;

import java.util.Arrays;

/**
 * TODO: 请添加描述
 *
 * @author lee
 * @date 2019-03-17
 * @since 1.0.0
 */
public enum ImageTypeEnum {

    /**
     * 1, "商品图片",2, "品牌LOGO"
     */
    GOODS(1, "商品图片"),
    BRAND(2, "品牌LOGO"),
    GOODS_CLASSIFY(3, "商品分类"),
    GOODS_TOP_BACK(3, "商品推荐模块背景图");

    private Integer value;
    private String desc;

    ImageTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static ImageTypeEnum getByValue(int value) {
        return Arrays.stream(ImageTypeEnum.values()).filter((t) -> t.getValue() == value).findFirst().get();
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
